<template>
  <div>
    <div id="main"></div>
  </div>
</template>

<script>
import * as echarts from "echarts";
export default {
  name: "Test",
  mounted() {
    var myChart = echarts.init(document.getElementById("main"));
    myChart.setOption({
      titile: {
        Text: "折线图",
        x: "center",
        background: "pink",
      },
      xAxis: {
        type: "category",
        data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
      },
      yAxis: {
        type: "value",
      },
      series: [
        {
          data: [150, 230, 224, 218, 135, 147, 260],
          type: "line",
        },
      ],
    });
  },
  methods: {},
};
</script>

<style scoped>
#main {
  height: 500px;
  width: 500px;
}
</style>
